<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<html>
<head>
  <title><c:out value="${page.name}" /></title>
  <link href="css/default.css" rel="stylesheet" type="text/css" />
</head>
<body>

  <%@ include file="head.jspf" %>

  <div id="header">
    <h2><c:out value="${page.name}" /></h2>
  </div>

  <div id="contents">
    <c:out value="${page.contents}" default="Here is where I talk about Myself" escapeXml="false" />
  </div>

  <c:if test="${isCurrentUser}">
    <div id="updates">
      <form action="account" method="post">
        <input name="pageName" value="<c:out value="${page.name}" />" /><br/><br/>
        <textarea name="contents"><c:out value="${page.contents}" default="Here is where I talk about Myself" /></textarea>
        <input type="submit" name="contentsubmit" value="Update" />
      </form>
    </div>
  </c:if>

  <div id="friends">
    <h3>My Friends</h3><c:if test="${isCurrentUser}">[<a href="list">Add Friends</a>]</c:if>
    <ul>
    <c:forEach var="friend" items="${friends}">
      <li><em><a href="show?email=${friend.email}">${friend.name}</a></em></li>
    </c:forEach>
    </ul>
  </div>

  <%@ include file="foot.jspf" %>

</body>
</html>
